var mongoose = require('mongoose');
var mongooseValidateFilter = require('mongoose-validatefilter');

var validate = new mongooseValidateFilter.validate();
var filter = new mongooseValidateFilter.filter();

var PermissionSchema = new mongoose.Schema({
    node: [{
        name: {
            type: String,
            required: true,
            trim: true
        },
        path: {
            type: String,
            required: true,
            trim: true
        },
        onl: {
            type: Boolean,
            default: true
        },
    }]
});

mongoose.model('Permission', PermissionSchema);

exports.PermissionSchema = PermissionSchema
